package com.koron.order.experiment.service;

import com.koron.bean.base.Attachment;
import com.koron.bean.base.Response;
import com.koron.common.core.business.common.service.CommonService;
import com.koron.order.common.bean.po.OrderInstructionBean;
import com.koron.order.common.bean.po.OrderSignBean;
import com.koron.order.experiment.bean.dto.ExperimentExecuteDto;
import com.koron.order.experiment.bean.dto.FiledDescriptDto;
import com.koron.order.experiment.bean.po.*;
import com.koron.order.experiment.bean.vo.ExperimentEquipmentVo;
import com.koron.order.experiment.bean.vo.ExperimentExecuteInfoVo;
import com.koron.order.experiment.bean.vo.ExperimentItemVo;
import com.koron.order.experiment.bean.vo.OperateFormVo;
import org.koron.ebs.mybatis.SessionFactory;

import java.lang.reflect.InvocationTargetException;
import java.util.List;
import java.util.Map;

public interface ExperimentExecuteService extends CommonService {

    int insertOrUpdate(SessionFactory factory, ExperimentExecuteDto experimentExecuteDto);

    String insertOrUpdateExecuteInfo(SessionFactory factory, ExperimentExecuteInfoVo experimentExecuteInfoVo);

    boolean deleteExecuteInfo(SessionFactory factory, String orderId, String orderExecuteId);

    String insertOrUpdateOperateForm(SessionFactory factory, OperateFormVo operateFormVo);

    int deleteById(SessionFactory factory, String id);

    OperateFormVo queryByOrderId(SessionFactory factory, String orderId);

    List<ExperimentReadyPo> queryReadyByOrderId(SessionFactory factory, String orderId);

    List<OrderInstructionBean> queryInstructionByOrderId(SessionFactory factory, String orderId);

    List<ExperimentEquipmentVo> queryEquipmentVoByOrderId(SessionFactory factory, String orderId);

    List<ExperimentEquipmentPo> queryEquipmentBeanListByOrderId(SessionFactory factory, String orderId);

    ExperimentEquipmentVo queryExperimentParamsByEqId(SessionFactory factory, String orderId, String experimentEquipId);

    List<ExperimentItemVo> queryExperimentItemByEqId(SessionFactory factory, String orderId, String experimentEquipId);

    List<Attachment> queryAttachmentListByOrderId(SessionFactory factory, String orderId);

    int updateExperimentReady(SessionFactory factory, ExperimentReadyPo experimentReadyPo);

    int updateExperimentItemVo(SessionFactory factory, ExperimentItemVo experimentItemVo);

    int updateExperimentInfo(SessionFactory factory, ExperimentPo experimentPo);

    int updateExperimentEquipmentInfo(SessionFactory factory, ExperimentEquipmentPo equipmentPo);

    int updateExperimentParamsPo(SessionFactory factory, ExperimentParamsPo experimentParamsPo);

    int updateExperimentItem(SessionFactory factory, ExperimentItemPo experimentItemPo);

    int updateExperimentItemParams(SessionFactory factory, ExperimentItemParamsPo itemParamsBean);

    int insertOrderSignInfo(SessionFactory factory, OrderSignBean orderSignBean);

    int deleteOrderSignInfo(SessionFactory factory, String orderSignId);

    boolean generateStand(SessionFactory factory, String orderId);

    Map<String, String> getExperimentData(SessionFactory factory, String experimentEquipmentId) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException;

    List<FiledDescriptDto> getExperimentDataJson(SessionFactory factory, String experimentEquipmentId) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException;

    List<FiledDescriptDto> getExperimentDataJsonFromStandard(SessionFactory factory, String standardId) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException;

    Response electronicSignatureCallback(SessionFactory factory, String experimentEquipmentId, String documentId, String tenantName, String contact, String type, String signStatus);

}
